import Layout from '@/layout'

const goodsRouter = {
  path: '/goods',
  component: Layout,
  redirect: '/cms/goods',
  name: 'goods',
  meta: {
    title: '商品管理',
    icon: 'documentation'
  },
  hidden: true,
  children: [
    {
      path: 'list',
      component: () => import('@/views/goods/index'),
      name: 'goods',
      meta: { title: '商品管理', icon: 'list' }
    },
    {
      path: 'edit/:id(\\d+)',
      component: () => import('@/views/goods/edit'),
      name: 'GoodsEdit',
      meta: { title: '编辑商品', noCache: true, activeMenu: '/goods/list' },
      hidden: true
    },
    {
      path: 'add',
      component: () => import('@/views/goods/edit'),
      name: 'GoodsAdd',
      meta: { title: '新增商品', noCache: true, activeMenu: '/goods/list' },
      hidden: true
    }
  ]
}

export default goodsRouter